import java.io.BufferedReader
import java.io.InputStreamReader

fun main() {
    val reader = BufferedReader(InputStreamReader(System.`in`))
    val n = reader.readLine().toInt()
    val s = ArrayList<Int>(n * 2)

    for (line in 1..2) {
        for (num in reader.readLine().split(' ')) {
            s.add(num.toInt())
        }
    }
    s.sort()
    print((s[n - 1] + s[n]) / 2)
}